Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate request: return memory reference (take 2) #1067

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

puremourning
Copy link
Contributor

This implements 2 things:

First, we now return memoory references for all members of an evaluate request's response. This allows for dumping of memory around the results of mundane evaluation, such as variables, structs, etc.

Further, any evaluation result which is itself a pointer value gets the contained address as its memory address (as opposed to the load address of the pointer itslef). This in particular allows for dumping of arbitrary memory addresses by simply casting them to (void*) or some equivalent pointer type. This is consistent with other debug adapters.


@vadimcn I've re-opened this with a much simpler and more correct implementation. You can now dump any address simply by casting it to (void*) or a pointer. No longer guessing based on it being an integer.

here's a demo:

codelldb-watch-mem-dump

This implements 2 things:

First, we now return memoory references for all members of an evaluate
request's response. This allows for dumping of memory around the results
of mundane evaluation, such as variables, structs, etc.

Further, any evaluation result which is itself a pointer value gets the
contained address as its memory address (as opposed to the load address
of the pointer itslef). This in particular allows for dumping of
arbitrary memory addresses by simply casting them to (void*) or some
equivalent pointer type. This is consistent with other debug adapters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant